package com.aaa.service.impl;


import com.aaa.dao.TestResultFpaDao;
import com.aaa.service.TestResultFpaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TestResultFpaServiceImpl implements TestResultFpaService {
    @Autowired
    private TestResultFpaDao testResultFpaDao;


    /**
     * 将用户测试答案放入数据库中
     * @param list
     * @return
     */
    @Override
    public boolean insertTestFpa(List<Map> list) {
        Integer i=null;
        for(Map<String,Object> map:list){
            i=testResultFpaDao.insertTestFpa(map);
        }
        if(i>0&&i!=null){
            return true;
        }
        return false;
    }

    @Override
    public boolean deleteTestResultFpaById(Integer id) {
        int deleteTestResultFpaById = testResultFpaDao.deleteTestResultFpaById(id);
        if (deleteTestResultFpaById>0){
            return true;

        }
        return false;
    }

    @Override
    public boolean deleteTestResultFpaBatch(String id) {
        int deleteTestResultFpaBatch = testResultFpaDao.deleteTestResultFpaBatch(id);
        if (deleteTestResultFpaBatch>0){
            return true;
        }
        return false;
    }


}
